// test_cario_draw.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "cairo.h"
#define M_PI 3.141592654
int main(int argc, char *argv[])
{
	cairo_surface_t *surface;
	cairo_t *cr;

	surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 320, 320);

	cr = cairo_create(surface);
	
	cairo_set_line_width(cr, 1);
	cairo_set_source_rgb(cr, 1, 0, 0);
	cairo_move_to(cr, 0, 0);
	cairo_line_to(cr, 160, 160);
	cairo_stroke(cr);

	cairo_surface_write_to_png(surface, "image.png");
	cairo_destroy(cr);
	cairo_surface_destroy(surface);

    return 0;
}

